<!DOCTYPE html>
<html>

    <head>
        <meta charset="UTF-8">
        <title>canvas绘图2</title>
    </head>

    <body>
        <canvas id="canvas1" width="800" height="600"></canvas>
        <img src="{{ url_for('static', filename= './canvas_im.jpeg') }}" id="canvas_img" />
        <script type="text/javascript">

            window.onload=function(){
                var canvas = document.getElementById("canvas1");
                var image=document.getElementById("canvas_img");
                var context = canvas.getContext("2d");
                context.drawImage(image,10,10);
            }

        </script>
    </body>

</html>


